#!/bin/bash
source experiment.cfg
echo "Copying files to controller"
ssh_options="StrictHostKeyChecking=no"
controller_dns=$(cat controller-publicdns.txt)
#common_files="$jar_file $guava_file experiment.cfg run-java.sh"
common_files="$jar_file experiment.cfg run-java.sh"
scp -i $key_file -o $ssh_options $common_files ec2-user@$controller_dns:~/
scp -i $key_file -o $ssh_options $node_dns_file ec2-user@$controller_dns:~/nodes_aggr_all.txt
echo "Copied files to $controller_dns"
echo "Copying files to nodes"
cat node-publicdns.txt | while read line;
do
	scp -i $key_file -o $ssh_options $common_files ec2-user@$line:~/
	echo "Copied files to $line"
done
